/**p106/457
 * Coupling is the degree to which one class knows about another class.
 * If the only knowledge that class A has about class B, is what class B has
 *  exposed through its interface, then class A and class B are said to be 
 *  loosely coupled...that's a good thing.
 *  If, on the other hand, class A relies on parts of class B that are not part
 *  of class B's interface, then the COUPLING between the classes is tighter...
 *  NOT a good thing.
 *  In other words, if A knows more than it should about the way in which B 
 *  was implement, then A and B tightly COUPLED.
 *  
 *  Using this second scenario, imagine what happens when class B is enhanced. 
 *  Its quite possible that the developer enhancing B has no knowledge of class A,
 *  why would she? Class B' developer ought to feel that any enhancements that 
 *  do NOT break the class's interface should be safe, so she might change some 
 *  NON-INTERFACE part of the class, which then causes class A to break.
 * */
package session2.coupling;

public class DoTaxes {
	float rate;

	float doColorado() {
		SalesTaxRates str = new SalesTaxRates();
		// rate = str.salesRate; // ouch this should be a method call like rate
		// =
		// str.getSalesRate("CO");
		rate = str.getSalesRate("CO");

		return 3;
	}
	//
	// public static void main(String[] args) {
	// new DoTaxes().doColorado();
	// }
}